package com.woniu.dao;

import com.woniu.dto.HomeDetail;
import com.woniu.pojo.Home;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface HomeMapper {
    int deleteByPrimaryKey(Long homeId);

    int insert(Home record);

    int insertSelective(Home record);

    Home selectByPrimaryKey(Long homeId);

    int updateByPrimaryKeySelective(Home record);

    int updateByPrimaryKey(Home record);

    HomeDetail getHomeByUserId(@Param("id") long id);

    List getHomePloPerson(Long id);

    @Update("update home set address =#{address} where home_id=#{id}")
    int updateByKey(String address, Long id);
}